import * as vscode from 'vscode';
import * as Fs from 'fs';
import * as Path from 'path';
export function mkdirsSync(filepath: string): void {
  const rootPath = vscode.workspace.rootPath || '';
  const arr = filepath.split('/');
  let dir = arr[1];
  console.log(rootPath, 111222);
  for (let i = 1; i < arr.length + 1; i++) {
    let path = Path.join(rootPath, '/' + dir);
    console.log(path, dir, arr, !Fs.existsSync(path), 1122333);
    if (!Fs.existsSync(path)) {
      console.log(path, 12233444);
      // if (mkdirsSync(Path.dirname(path))) {
      Fs.mkdirSync(path);
      // }
    }
    dir = dir + '/' + arr[i];
  }
}
